
package com.rabincorp.facepoll.domain.services;

import java.io.Serializable;
import java.util.List;

/**
 *
 * @author isakrabin
 */
public interface GenericDAO<T extends Serializable> {
    
 
    T findByIndexId(Long indexId);
 
    List findByNamedQuery(String queryName);
 
    List findByNamedQueryAndParams(String queryName, Object ...params);
 
    T findUniqueByNamedQuery(String queryName);
 
    T findUniqueByNamedQueryAndParams(String queryName, Object ...params);
 
    T merge(T persistentEntity);
 
    T refresh(T persistentEntity);
 
    void remove(T persistentEntity);
 
    void save(T persistentEntity);
    
}
